<?php
include("config.php");
$dbLink	= mysql_connect ($sServer, $sUserName, $sPassword) or die("数据库Connect错误");
mysql_select_db ($sDBname, $dbLink) or die("数据库Select错误");

$name = $_REQUEST['name'];
if (!isset($name))
{
	echo "请输入参数name!";
	return;
}

$sSQL = "delete from friends where name='$name'";
$result = mysql_query($sSQL, $dbLink);
if ($result)
{
	header('Location:list.php');
}
else
{	
	echo "删除失败！";
}
?>
